<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0,maximum-scale=1.0, minimum-scale=1.0, user-scalable=no">
  <title>Document</title>
  <style>

  </style>
</head>
<body>

</body>
<script>
axios.defaults.baseURL = 'http://www.itcbc.com:3006'

let p1 = axios.get('/api/province')

let p2 = axios.get('/api/city', { params: { pname: '河北省' } })

let p3 = axios.get('/api/county', { params: { pname: '河北省', cname: '承德市' } })


p1.then(res1 => {
  console.log(res1.data) // 得到全部的省
  return p2
}).then(res2 => {
  console.log(res2.data) // 得到 河北省中所有的市
  return p3
}).then(res3 => {
  console.log(res3.data) // 得到 河北省承德市中所有的县
}).catch(err => {
  console.log(err) // 输出错误信息
})
</script>
</html>